package business
{
	import com.adobe.cairngorm.business.ServiceLocator;
	
	import mx.collections.ItemResponder;
	import mx.rpc.AsyncToken;
	import mx.rpc.remoting.RemoteObject;

	public class ExampleDelegate
	{
		private var responder:Object;
		private var service:RemoteObject;	
		
		public function ExampleDelegate(re:Object)
		{
			this.service = ServiceLocator.getInstance().getRemoteObject("exampleService");
			this.responder = re;	
		}
		
		public function returnOneParam(str:String):void
		{
			var token:AsyncToken;
			var itemResponder:ItemResponder;
			token = service.returnOneParam(str);
			itemResponder = new ItemResponder(responder["returnOneParamResult"],responder["fault"] );
			token.addResponder(itemResponder);  
		}
	}
}